package cn.autowired.exam.service.impl;

import cn.autowired.exam.entity.Student;
import cn.autowired.exam.dao.StudentMapper;
import cn.autowired.exam.service.StudentService;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 学生表 服务实现类
 * </p>
 *
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {

    @Override
    public List<Student> getStudentList(String studentNo,
                                        String name,
                                        Integer sex,
                                        String classInfo,
                                        String gradeInfo,
                                        String major) {

        return baseMapper.getStudentList(studentNo, name, sex, classInfo, gradeInfo, major);
    }


    @Override
    public Student selectByStudentNo(String studentNo) {

        return selectOne(new EntityWrapper<Student>().eq(Student.Field.studentNo,studentNo));
    }
}
